import { getCrudApi } from "@/utils/http/crud.ts";

export interface EmployeeDto {
  id?: string;
  name: string;
  employeeCode: string;
  idNumber?: string | null;
  phone?: string | null;
  email?: string | null;
  position?: string | null;
  hireDate?: Date | string | null;
  status?: EmployeeStatus;
  departmentId?: string | null;
  createdAt?: Date | string;
  updatedAt?: Date | string;
  userId?: string | null;
}

export type EmployeeStatus = "active" | "resigned" | "probation";

export default getCrudApi<EmployeeDto>("employee");
